package logic

import (
	"context"
	"shop-switcher/models/mysql"

	"shop-switcher/shoprpc/internal/svc"
	"shop-switcher/shoprpc/shoprpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type ShopListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewShopListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ShopListLogic {
	return &ShopListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ShopListLogic) ShopList(in *shoprpc.ShopListRequest) (*shoprpc.ShopListResponse, error) {
	// todo: add your logic here and delete this line
	var lists []*shoprpc.ShopList
	mysql.ShopList(mysql.DB)
	return &shoprpc.ShopListResponse{
		List: lists,
	}, nil
}
